package com.atguigu.daijia.customer.client;

import com.atguigu.daijia.common.result.Result;
import com.atguigu.daijia.common.util.AuthContextHolder;
import com.atguigu.daijia.model.form.customer.UpdateWxPhoneForm;
import com.atguigu.daijia.model.vo.customer.CustomerLoginVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.math.BigDecimal;

@FeignClient(value = "service-customer")
public interface CustomerInfoFeignClient {

	//微信小程序登录
	@GetMapping("/customer/info/login/{code}")
	public Result<Long> login(@PathVariable String code);

	//获取客户登录信息
	@GetMapping("/customer/info/getCustomerLoginInfo/{customerId}")
	Result<CustomerLoginVo> getCustomerLoginInfo(@PathVariable Long customerId);


	//更新客户微信手机号码
	@PostMapping("/customer/info/updateWxPhoneNumber")
	Result<Boolean> updateWxPhoneNumber(@RequestBody UpdateWxPhoneForm updateWxPhoneForm);

	/**
	 * 获取客户OpenId
	 * @param customerId
	 * @return
	 */
	@GetMapping("/customer/info/getCustomerOpenId/{customerId}")
	Result<String> getCustomerOpenId(@PathVariable("customerId") Long customerId);

}